import { Effect, Reducer } from 'umi';
import { setCookie } from '@/utils/cookie';
import { OrderDetailsType } from './data';
// 初始化Model层
export class OrderState {
  details: any; // 订单类型
}
interface OrderModelType {
  namespace: string;
  state: OrderState; // 封装后台返回的数据
  effects: {};
  reducers: {
    updateOrderDetail: Reducer<OrderState>;
  };
}
const model: OrderModelType = {
  namespace: 'order',
  state: {
    details: {},
  },
  effects: {},
  reducers: {
    updateOrderDetail(state, action) {
      return { ...state, ...action.payload };
    },
  },
};
export default model;
